package com.wwc.sc.service;

import com.wwc.sc.pojo.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;
@Component
@FeignClient(value = "SC-PROVIDER-DEPT",fallbackFactory = DeptClientServiceFallbackFactory.class)
public interface DeptClientService {

    @PostMapping("/dept/addDept")
    public int addDept(Dept dept);

    @GetMapping("/dept/queryDept/{deptNo}")
    public Dept queryDept(@PathVariable("deptNo") String deptNo);

    @GetMapping("/dept/queryAllDept")
    public List<Dept> queryAllDept();
}
